import { Component } from 'react';
import './App.css';
import Mark from './components/Mark'
import Input from './components/Input'
import Life from './components/Life'
import Life2 from './components/Life2'
import Prop from './components/Prop'
import Swiper from './components/Swiper'

// function App() {
//   return (
//     <div className="App"> 
//       {/* 自相符传递数据案例--弹框 */}
//       {/* <Mark/> */}

//       {/* 受控组件 */}
//       {/* <Input/> */}

//       {/* 生命周期 */}
//       {/* <Life/> */}
//       <Life2 num = { 88888888 }/>
//     </div>
//   );
// }



class App extends Component {
  state = {
    num: 88888888,
    flag: true
  }
  render() {
    const { num, flag } = this.state
    const div = flag? <Life2 num = { num }/>: <></>
    return <div>
      <Swiper/>

      {/* <button onClick = {() => {
        this.setState({
          flag: !this.state.flag
        })
      }}>销毁一下</button>
      { div } */}


      {/* <button onClick = {() => {
        this.setState({
          num: this.state.num += 100
        })
      }}>修改Props数据</button> */}
    </div>
  }
}

export default App;
